﻿using System;

namespace ManageSystemServer.Entity
{
    public class Student
    {
        //Primary Key
        public uint StudentId { get; set; }

        public string Name { get; set; } = "";

        public uint Age { get; set; }

        public uint Grade { get; set; }

        public string Major { get; set; } = "";

        public override bool Equals(object? obj)
        {
            return obj is Student student &&
                   StudentId == student.StudentId &&
                   Name == student.Name &&
                   Age == student.Age &&
                   Grade == student.Grade &&
                   Major == student.Major;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(StudentId, Name, Age, Grade, Major);
        }
    }
}
